package com.air.common.vo;

import java.io.Serializable;
import java.util.List;

public class PageResultListVO implements Serializable{
	

	private List<?> result;
	private Integer pageNum; //当前页，从0开始
	private Integer pageLimit;//每页的记录数
	private Integer totalRecorderCount;//总共记录数
	private Integer totalPageCount;//总共页数
	
	public  List<?> getResult() {
		return result;
	}

	public void setResult(List<?> result) {
		this.result = result;
	}

	public Integer getPageNum() {
		return pageNum;
	}

	public void setPageNum(Integer pageNum) {
		this.pageNum = pageNum;
	}


	public Integer getTotalRecorderCount() {
		return totalRecorderCount;
	}

	public void setTotalRecorderCount(Integer totalRecorderCount) {
		this.totalRecorderCount = totalRecorderCount;
	}
	
	public Integer getTotalPageCount(){
		 if (totalRecorderCount%pageLimit == 0){
			 totalPageCount = totalRecorderCount/pageLimit;
		 }else{
			 totalPageCount = (int)Math.ceil(totalRecorderCount/pageLimit);
		 }
		 return totalPageCount;
	}

	public Integer getPageLimit() {
		return pageLimit;
	}

	public void setPageLimit(Integer pageLimit) {
		this.pageLimit = pageLimit;
	}
	
	/*JUST for meet requirement of datagrid format in easyui*/
	public Integer getTotal(){
		return this.totalRecorderCount;
	} 
	public List<?> getRows(){
		return result;
	} 
}
